//
//  MHCHBaysomethingViewController.m
//  Go!
//
//  Created by rimi on 16/7/18.
//  Copyright © 2016年 凌风. All rights reserved.
//

#import "MHCHBaysomethingViewController.h"
#import "HQYHomePageViewController.h" // 首页
#import "GoodsArray.h"
@interface MHCHBaysomethingViewController ()

@property (nonatomic, strong) UIImageView *imageview ;
@property (nonatomic, strong) UIButton *backbtn;
@property (nonatomic, strong) UILabel *lable;
@property (nonatomic, strong) UIImageView *phoneimageview;
@property (nonatomic, strong) UIButton *gotobayBtn;
@end

@implementation MHCHBaysomethingViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    if ([GoodsArray shareArray] == nil) {
        [self.view addSubview:self.imageview];
        [self.imageview addSubview:self.gotobayBtn];
    }else {
        [self.view addSubview:self.imageview];
        [self.imageview addSubview:self.gotobayBtn];
    }
    [self.view addSubview:self.backbtn];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.

}


- (UIImageView *)imageview{
    if (!_imageview) {
        _imageview = [[UIImageView alloc]initWithFrame:CGRectMake(Size_W(0), Size_H(0),Size_W(414), Size_H(736)-49)];
        _imageview.userInteractionEnabled = YES;
        _imageview.image = [UIImage imageNamed:@"你的购物车空空如也.jpg"];
    }
    return _imageview;
}



-(UIButton *)backbtn{
    if (!_backbtn) {
        _backbtn = [[UIButton alloc]initWithFrame:CGRectMake(20, 30,Size_W(50), Size_H(35))];
        [_backbtn setImage:[UIImage imageNamed:@"我的返回"] forState:UIControlStateNormal];
        [_backbtn addTarget:self action:@selector(clickback) forControlEvents:UIControlEventTouchUpInside];
    }
    return _backbtn;
}

-(UIButton *)gotobayBtn{
    if (!_gotobayBtn) {
        _gotobayBtn = [[UIButton alloc]initWithFrame:CGRectMake(20, 30,Size_W(70), Size_H(35))];
        _gotobayBtn.center = CGPointMake(Size_W(210), Size_H(360));
        [_gotobayBtn addTarget:self action:@selector(clickback2) forControlEvents:UIControlEventTouchUpInside];
        _gotobayBtn.backgroundColor = [UIColor redColor];
    }
    return _gotobayBtn;
}


#pragma mark - 点击事件
-(void) clickback{
    [self.navigationController popViewControllerAnimated:YES];
}

-(void) clickback2{
    self.tabBarController.selectedIndex = 2;
    [self.navigationController popViewControllerAnimated:NO];
}



@end
